/*
 * Copyright 2012 NJUT  qixiaobo. All rights reserved.
 */
package com.fujitsu.cn.fnst.velocity.tool;

import org.apache.velocity.tools.config.DefaultKey;
import org.apache.velocity.tools.generic.SafeConfig;

import com.fujitsu.cn.fnst.common.StringUtils;

/**
 * EncryptTool.java
 * 
 * @author Qixiaobo-win8
 */
@DefaultKey("encrypt")
public class EncryptTool extends SafeConfig {
	public String encrypt(String password) {
		return StringUtils.encrypt(password);
	}

	public String decrypt(String data) {
		return StringUtils.decrypt(data);
	}
}
